The present invention relates to an image processing apparatus, an image processing method and a storage medium. More particularly, the invention relates to an image processing apparatus, an image processing method and a storage medium for creating a sharply-focused image by the use of a plurality of images having different degrees of defocusing.
Today, so-called auto-focus cameras are becoming the mainstream of photographic apparatuses. In operation, the auto-focus camera measures the distance to a target object, moves the lens into an optimum position relative to the measured distance (i.e., a lens position such that a focused image can be projected onto an image pickup plane), and takes a focused picture of the object.
A major disadvantage of the auto-focus cameras is their high price. Expensive parts are necessary for moving the lens to achieve focus.
The present invention has been made in view of the above circumstances and provides an apparatus and a method constituting a low-cost scheme that creates focused images of target objects without moving the lens.
In carrying out the invention and according to one aspect thereof, there is provided an image processing apparatus for processing images picked up on a number of different image pickup planes, each having a different distance to a lens. The apparatus includes: an acquiring element for acquiring a plurality of images of a target object picked up on the plurality of image pickup planes; a first computing element for computing weights of the plurality of images acquired by the acquiring element; a second computing element for computing averages of the plurality of images acquired by the acquiring element; and an image creating element for creating an optimum image of the target object by obtaining a weighted average based on the weights computed by the first computing element and on the averages of the plurality of images computed by the second computing element.
In a preferred embodiment, the image processing apparatus further includes an image pickup element for picking up images of the target object on the multiple different image pickup planes.
According to another aspect of the invention, there is provided an image processing method for use with an image processing apparatus for processing images picked up on a number of different image pickup planes each having a different distance to a lens. The method includes the steps of acquiring multiple images of a target object picked up on the multiple different image pickup planes; computing weights of the different images acquired in the acquiring step; computing averages of the multiple images acquired in the acquiring step; and creating an optimum image of the target object by obtaining a weighted average based on the weights computed in the first computing step and on the averages of the multiple images computed in the second computing step.
According to a further aspect of the invention, there is provided a storage medium which stores a computer-readable program for use with an image processing apparatus for processing images picked up on a number of different image pickup planes having different distances to a lens. The program embodies the steps of acquiring a number of different images of a target object picked up on the multiple different image pickup planes; computing weights of the multiple images acquired in the acquiring step; computing averages of the multiple images acquired in the acquiring step; and creating an optimum image of the target object by obtaining a weighted average based on the weights computed in the first computing step and on the averages of the multiple images computed in the second computing step.
Through the use of the inventive image processing apparatus, image processing method, and storage medium containing the inventive program, weights of multiple picked-up images of a target object are computed, and averages of these images are calculated. A weighted average is then computed on the basis of the computed weights and of the averages of the multiple images, whereby an optimum image of the target object is created.